<div class="view">

	<div class="right small top bottom">
		<?php
		$formatter = Yii::app()->dateFormatter;
		echo $formatter->formatDateTime($data->createdAt, 'full', 'short');
		?>
	</div>

	<div class="column">
		<?php
		$hostInfo = Yii::app()->request->hostInfo;
		$baseUrl = Yii::app()->request->baseUrl;
		$config = array(
			'email'=>$data->posterEmail,
			'hashed'=>false,
			'default'=>"{$hostInfo}{$baseUrl}/images/gravatar-150.png",
			'size'=>150,
			'rating'=>'PG',
			'htmlOptions'=>array(
				'alt'=>'Avatar Icon',
				'title'=>CHtml::encode($data->posterName),
			),
		);
		$this->widget('application.extensions.EGravatarWidget', $config);
		?>
	</div>
	
	<div>
		<b><?php echo CHtml::encode($data->posterName); ?>:</b>
	</div>

	<div>
		<?php echo CHtml::encode($data->value); ?>
	</div>

	<?php if ($this->route != 'post/view'): ?>
		<div class="small top bottom prepend-top">
			<?php
			$alt = $data->replyCount ? 'View' : 'Reply';
			if ($data->replyCount) {
				$plural = $data->replyCount > 1 ? 'replies' : 'reply';
				$text = "$data->replyCount $plural";
			} else {
				$text = 'Reply';
			}
			$htmlOptions = array(
				'title'=>$alt,
			);
			$url = array('post/view', 'id'=>$data->id);
			echo CHtml::link($text, $url, $htmlOptions);
			?>
		</div>

	<?php endif; ?>

	<div class="clear"></div>

</div>